home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / redakcyjne / programy / PSPad editor 4.5.4 build 2356 beta / pspad454inst_en.exe / {app} / Context / SAS.def < prev    next >
Text File  |  2005-09-24  |  11KB  |  440 lines

  1. ; PSPad code template for SAS
  2. ; Created by JSK okt 2003
  3. ;
  4. [Macro definition]
  5. %TableName%=@E Table name:,,,,
  6. %Package%=@E Package:,,,,
  7. %Author%=@E Author:,,,,
  8. %Date%=@D Date:,,,,
  9. ;
  10. ;
  11. [COMMENT |r COMMENT BLOCK]
  12. /*
  13. */
  14. [IF | IF  END IF]
  15. IF | THEN
  16. END IF;
  17. [IFE | IF ELSE END IF]
  18. IF | THEN
  19.   NULL;
  20. ELSE
  21.   NULL;
  22. END IF;
  23. [IFI | IF ELSIF  END IF]
  24. IF | THEN
  25.   NULL;
  26. ELSIF THEN
  27.   NULL;
  28. ELSIF THEN
  29.   NULL;
  30. ELSIF THEN
  31.   NULL;
  32. ELSE
  33. END IF;
  34. [FOR iCnt | FOR iCnt IN .. LOOP]
  35. FOR iCnt IN |.. LOOP
  36. END LOOP;
  37. [FOR o | FOR o IN (SELECT LOOP]
  38. FOR o| IN  ( SELECT
  39.            )
  40. LOOP
  41.   NULL;
  42. END LOOP;
  43. ;
  44. ;
  45. --------------------------------------------------------------------------------
  46. [PROC SORT |m PROC SORT]*CTRL+ALT+S
  47. PROC SORT DATA=%TableName% <option(s)> <collating-sequence-option>;
  48.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n>;
  49. --------------------------------------------------------------------------------
  50. [PROC APPEND |m PROC APPEND]*CTRL+ALT+A
  51. PROC APPEND BASE=<libref.>SAS-data-set
  52.     <DATA=<libref.>SAS-data-set>
  53.     <FORCE>
  54.     <APPENDVER=V6>;
  55. --------------------------------------------------------------------------------
  56. [PROC COMPARE |m PROC COMPARE]*CTRL+ALT+C
  57. PROC COMPARE <option(s)>;
  58.     BY <DESCENDING> variable-1
  59.     <...<DESCENDING> variable-n>
  60.     <NOTSORTED>;
  61.  
  62.     ID <DESCENDING> variable-1
  63.     <...<DESCENDING> variable-n>
  64.     <NOTSORTED>;
  65.  
  66.      VAR variable(s);
  67.  
  68.      WITH variable(s);
  69. --------------------------------------------------------------------------------
  70. [PROC CONTENTS |m PROC CONTENTS]*
  71. PROC CONTENTS < option(s) >;
  72. --------------------------------------------------------------------------------
  73. [PROC COPY |m PROC COPY]*
  74. PROC COPY OUT=libref-1 IN=libref-2
  75.     <CLONE|NOCLONE>
  76.     <CONSTRAINT=YES|NO>
  77.     <DATECOPY>
  78.     <INDEX=YES|NO>
  79.     <MEMTYPE=(mtype(s))>
  80.     <MOVE <ALTER=alter-password>>;
  81.  
  82.     EXCLUDE SAS-file(s)
  83.     </ MEMTYPE=mtype>;
  84.  
  85.      SELECT SAS-file(s)
  86.     </ <MEMTYPE=mtype>
  87.     <ALTER=alter-password>>;
  88.     /*
  89.     Note:   IN=libref-1 is required on PROC COPY, but is optional on the COPY
  90.     statement
  91.     */
  92. --------------------------------------------------------------------------------
  93. [PROC DATASETS |m PROC DATASETS]*
  94. PROC DATASETS < option(s) >;
  95.     AGE current-name related-SAS-file(s)
  96.     </ <ALTER=alter-password>
  97.     <MEMTYPE=mtype>>;
  98.  
  99.      APPEND BASE= <libref.>SAS-data-set
  100.         <APPENDVER=V6>
  101.         <DATA=<libref.>SAS-data-set>
  102.         <GENNUM=integer>
  103.         <FORCE>;
  104.  
  105.     AUDIT SAS-file-name <SAS-password>;
  106.         INITIATE;
  107.         <LOG < BEFORE_IMAGE=YES|NO>
  108.         <DATA_IMAGE=YES|NO>
  109.         <ERROR_IMAGE=YES|NO>>;
  110.         <USER_VAR=variable-1 <... variable-n>>;
  111.  
  112.         or
  113.  
  114.     AUDIT SAS-file-name <SAS-password><GENNUM= integer>;
  115.         SUSPEND|RESUME|TERMINATE;
  116.  
  117.      CHANGE old-name-1=new-name-1
  118.     <...old-name-n=new-name-n >
  119.     </ <ALTER=alter-password>
  120.     <GENNUM=ALL|integer>
  121.     <MEMTYPE=mtype>>;
  122.  
  123.      CONTENTS < option(s)>;
  124.  
  125.      COPY OUT=libref-1
  126.     <CLONE|NOCLONE>
  127.     <CONSTRAINT=YES|NO>
  128.     <IN=libref-2>
  129.     <INDEX=YES|NO>
  130.     <MEMTYPE=(mtype(s))>
  131.     <MOVE <ALTER=alter-password>;>
  132.  
  133.     EXCLUDE SAS-file(s) < / MEMTYPE=mtype>;
  134.  
  135.      SELECT SAS-file(s)
  136.     </ <ALTER=alter-password>
  137.     <MEMTYPE= mtype>>;
  138.  
  139.      DELETE SAS-file(s)
  140.     </ <ALTER=alter-password>
  141.     <GENNUM=ALL|HIST|REVERT|integer>
  142.     <MEMTYPE=mtype>>;
  143.  
  144.  
  145.      EXCHANGE name-1=other-name-1
  146.     <...name-n=other-name-n>
  147.     </ <ALTER=alter-password>
  148.     <MEMTYPE=mtype> >;
  149.  
  150.  
  151.      MODIFY SAS-file <(file-option(s))>
  152.     </ <GENNUM=integer> 
  153.     <MEMTYPE=mtype>>;  FORMAT variable-list-1 <format-1> 
  154.     <...variable-list-n <format-n>>;  
  155.     
  156.     IC CREATE <constraint-name>= (NOT NULL (variable) | 
  157.     CHECK(WHERE-expression) | 
  158.     PRIMARY KEY (variables) | 
  159.     UNIQUE (variables) | 
  160.     FOREIGN KEY (variables) REFERENCES <libref>.SAS-data-set 
  161.     <ON DELETE referential-action> <ON UPDATE referential-action>) 
  162.     <MESSAGE='message-string' <MSGTYPE=USER>>;  
  163.     
  164.     
  165.      IC DELETE constraint-name(s)| _ALL_;  
  166.     
  167.     
  168.      IC REACTIVATE foreign-key-name REFERENCES libref;  
  169.     
  170.     
  171.      INDEX CENTILES index(s) 
  172.     </ <REFRESH>
  173.     <UPDATECENTILES= 
  174.     ALWAYS|NEVER|integer> >;
  175.  
  176.     
  177.      INDEX CREATE index-specification(s) 
  178.     </ <NOMISS> 
  179.     <UNIQUE> 
  180.     <UPDATECENTILES= 
  181.     ALWAYS|NEVER|integer>>;  
  182.     
  183.     
  184.      INDEX DELETE index(s)|_ALL_;  
  185.     
  186.     
  187.      INFORMAT variable-list-1 <informat-1> 
  188.     <...variable-list-n <informat-n>>;  
  189.     
  190.     
  191.      LABEL variable-1=<'label-1'|' '> 
  192.     <...variable-n=<'label-n'|' ' >>;  
  193.     
  194.     
  195.      RENAME old-name-1=new-name-1 
  196.     <...old-name-n=new-name-n>;  
  197.     
  198.     
  199.      
  200.     
  201.     
  202.      REPAIR SAS-file(s) 
  203.     </ <ALTER=alter-password>
  204.     <GENNUM=integer>
  205.     <MEMTYPE=mtype>>;
  206.  
  207.  
  208.      SAVE SAS-file(s) </ MEMTYPE=mtype>;
  209. --------------------------------------------------------------------------------
  210. [PROC EXPORT |m PROC EXPORT]*
  211. PROC EXPORT DATA=SAS-data-set
  212.     OUTFILE="filename" | OUTTABLE="tablename"
  213.     <DBMS=identifier> <REPLACE>;  < data-source-statements;>
  214.  
  215. --------------------------------------------------------------------------------
  216. [PROC FORMAT |m PROC FORMAT]*
  217. PROC FORMAT <option(s)>;  EXCLUDE entry(s);
  218.  
  219.     INVALUE <$>name <(informat-option(s))> value-range-set(s);
  220.  
  221.     PICTURE name <(format-option(s))>
  222.     value-range-set-1 <(picture-1-option(s) )>
  223.     <...value-range-set-n <(picture-n-option(s))>>;
  224.  
  225.     SELECT entry(s);
  226.  
  227.     VALUE <$>name <(format-option(s))> value-range-set(s);
  228. --------------------------------------------------------------------------------
  229. [PROC FREQ |m PROC FREQ]*
  230. PROC FREQ <option(s)>;  BY <DESCENDING> variable-1 <...<DESCENDING> variable-n>
  231.     <NOTSORTED>;
  232.  
  233.     EXACT statistic-keyword(s) </ option(s)>;
  234.  
  235.     OUTPUT statistic-keyword(s) <OUT=SAS-data-set>;
  236.  
  237.     TABLES request(s) </ option(s)>;
  238.  
  239.     TEST statistic-keyword(s);
  240.  
  241.     WEIGHT variable;
  242. --------------------------------------------------------------------------------
  243. [PROC IMPORT |m PROC IMPORT]*
  244. PROC IMPORT
  245.     DATAFILE="filename" | TABLE="tablename"
  246.     OUT=SAS-data-set
  247.     <DBMS=identifier><REPLACE>;  < data-source-statements;>
  248.     
  249. --------------------------------------------------------------------------------
  250. [PROC MEANS |m PROC MEANS]*
  251. PROC MEANS <option(s)> <statistic-keyword(s)>;
  252.     BY <DESCENDING> variable-1 <... <DESCENDING> variable-n><NOTSORTED>;
  253.  
  254.     CLASS variable(s) </ option(s)>;
  255.  
  256.     FREQ variable;
  257.  
  258.     ID variable(s);
  259.  
  260.     OUTPUT <OUT=SAS-data-set> <output-statistic-specification(s)>
  261.         <id-group-specification(s)> <maximum-id-specification(s)>
  262.         <minimum-id-specification(s)> </ option(s)> ;
  263.  
  264.     TYPES request(s);
  265.  
  266.     VAR variable(s) < / WEIGHT=weight-variable>;
  267.  
  268.     WAYS list;
  269.  
  270.     WEIGHT variable;
  271.  
  272. --------------------------------------------------------------------------------
  273. [PROC PRINT |m PROC PRINT]*
  274. PROC PRINT < option(s)>;
  275.     BY < DESCENDING> variable-1  <...< DESCENDING> variable-n>< NOTSORTED>;
  276.  
  277.     PAGEBY BY-variable;
  278.  
  279.     SUMBY BY-variable;
  280.  
  281.     ID variable(s);
  282.  
  283.     SUM variable(s);
  284.  
  285.     VAR variable(s);
  286.  
  287. --------------------------------------------------------------------------------
  288. [PROC REPORT |m PROC REPORT]*
  289. PROC REPORT <option(s)>;
  290.     BREAK location break-variable</ option(s)>;
  291.  
  292.     BY <DESCENDING> variable-1
  293.     <...<DESCENDING> variable-n> <NOTSORTED>;
  294.  
  295.     COLUMN column-specification(s);
  296.  
  297.     COMPUTE location <target>
  298.         </ STYLE=<style-name> <[style-attribute-specification(s)]>>;
  299.  
  300.         LINE specification(s);
  301.  
  302.         /* ... select SAS language elements ... */
  303.  
  304.     ENDCOMP;
  305.     
  306.     COMPUTE report-item </ type-specification>;
  307.         CALL DEFINE (column-id, 'attribute-name', value);
  308.  
  309.         /* ... select SAS language elements ... */
  310.  
  311.     ENDCOMP;
  312.  
  313.     DEFINE report-item / <usage>
  314.         <attribute(s)>
  315.         <option(s)>
  316.         <justification>
  317.         <COLOR=color>
  318.         <'column-header-1' <...'column-header-n'>>
  319.         <style>;
  320.  
  321.     FREQ variable;
  322.  
  323.     RBREAK location </ option(s)>;
  324.  
  325.     WEIGHT variable;
  326.  
  327. --------------------------------------------------------------------------------
  328. [PROC SQL |m PROC SQL]*
  329. PROC SQL< option-list>;
  330.     ALTER TABLE alter-statement;
  331.  
  332.     CREATE create-statement;
  333.  
  334.     DELETE delete-statement;
  335.  
  336.     DESCRIBE describe-statement;
  337.  
  338.     DROP drop-statement;
  339.  
  340.     INSERT insert-statement;
  341.  
  342.     RESET <reset statement option-list>;
  343.  
  344.     SELECT select-statement;
  345.  
  346.     UPDATE update-statement;
  347.  
  348.     VALIDATE validate-statement;
  349.  
  350. --------------------------------------------------------------------------------
  351. [PROC SUMMARY |m PROC SUMMARY]*
  352. /*
  353. See the MEANS procedure syntax for details.
  354. */
  355. PROC SUMMARY <option(s)> <statistic-keyword(s)>;
  356.     BY <DESCENDING> variable-1<...<DESCENDING> variable-n> <NOTSORTED>;
  357.  
  358.     CLASS variable(s) </ option(s)>;
  359.  
  360.     FREQ variable;
  361.  
  362.     ID variable(s);
  363.  
  364.     OUTPUT <OUT=SAS-data-set><output-statistic-specification(s)>
  365.     <id-group-specification(s)> <maximum-id-specification(s)>
  366.     <minimum-id-specification(s)></ option(s)> ;
  367.  
  368.     TYPES request(s);
  369.  
  370.     VAR variable(s)</ WEIGHT=weight-variable>;
  371.  
  372.     WAYS list;
  373.  
  374.     WEIGHT variable;
  375.  
  376. --------------------------------------------------------------------------------
  377. [PROC TABULATE |m PROC TABULATE]*
  378. PROC TABULATE <option(s)>;
  379.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  380.  
  381.     CLASS variable(s) </ options>;
  382.  
  383.     CLASSLEV variable(s) / STYLE=<style-element-name | <PARENT>> <[style-attribute-specification(s)] >;
  384.  
  385.     FREQ variable;
  386.  
  387.     KEYLABEL keyword-1='description-1' <...keyword-n='description-n'>;
  388.  
  389.     KEYWORD keyword(s) / STYLE =<style-element-name | <PARENT>> <[style-attribute-specification(s)] >;
  390.  
  391.     TABLE <<page-expression,> row-expression,> column-expression </ table-option(s)>;
  392.  
  393.     VAR analysis-variable(s)</ options>;
  394.  
  395.     WEIGHT variable;
  396.  
  397. --------------------------------------------------------------------------------
  398. [PROC TRANSPOSE |m PROC TRANSPOSE]*
  399. PROC TRANSPOSE <DATA=input-data-set> <LABEL=label> <LET>
  400.     <NAME=name> <OUT=output-data-set> <PREFIX=prefix>;
  401.     
  402.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  403.  
  404.     COPY variable(s);
  405.  
  406.     ID variable;  IDLABEL variable;
  407.  
  408.     VAR variable(s);
  409.  
  410. --------------------------------------------------------------------------------
  411. [PROC UNIVARIATE |m PROC UNIVARIATE]
  412. PROC UNIVARIATE <option(s)>;
  413.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  414.  
  415.     CLASS variable-1<(variable-option(s))> <variable-2<(variable-option(s))>>
  416.         </ KEYLEVEL= 'value1'|('value1' 'value2')>;
  417.  
  418.     FREQ variable;
  419.  
  420.     HISTOGRAM <variable(s)> </ option(s)>;
  421.  
  422.     ID variable(s);
  423.  
  424.     INSET <keyword(s)> </ option(s)>;
  425.  
  426.     OUTPUT <OUT=SAS-data-set>
  427.         statistic-keyword-1=name(s)
  428.         <... statistic-keyword-n=name(s)>
  429.         <percentiles-specification>;
  430.  
  431.     PROBPLOT <variable(s)> </ option(s)>;
  432.  
  433.     QQPLOT <variable(s)> </ option(s)>;
  434.  
  435.     VAR variable(s);
  436.  
  437.     WEIGHT variable;
  438. --------------------------------------------------------------------------------
  439.